<!--
  Generated template for the LnList page.

  See http://ionicframework.com/docs/components/#navigation for more info on
  Ionic pages and navigation.
-->
<ion-header>
  <ion-navbar color="primary">
    <button ion-button menuToggle>
      <ion-icon name="menu"></ion-icon>
    </button>
    <ion-title>All novels</ion-title>

    <ion-buttons end>
      <button ion-button icon-only (click)="openFilterModal()">
        <ion-icon name="funnel"></ion-icon>
      </button>
      <button ion-button icon-only (click)="searchTapped()">
        <ion-icon name="search"></ion-icon>
      </button>
    </ion-buttons>

  </ion-navbar>
</ion-header>

<ion-content no-padding>
  <ln-novel-list [novels]="novels" [showEmpty]="false"></ln-novel-list>

  <ion-infinite-scroll *ngIf="novels?.length" (ionInfinite)="$event.waitFor(updateNovelList())">
    <ion-infinite-scroll-content></ion-infinite-scroll-content>
  </ion-infinite-scroll>

  <div padding-top *ngIf="noInternet" class="no-content">
    <ion-icon name="ios-sad"></ion-icon>
    <div>NO CONNECTION</div>
    <button ion-button color="secondary" (click)="resetNovelList()">Retry</button>
  </div>

</ion-content>